fix: bound stale running turn recovery - #83
Conversation
|
Thanks for the thorough writeup and the clean minimal fix — the approach is correct and has been carried forward. I've rebased your work onto current main (main moved substantially since 8/27: the cancel drain gate, v4/command stop, and steer-report rework landed in the same loop) as #85, with three adaptations:
On your open policy question: no hard cap on lock-held deferral. Backend-owned long work is legitimate and user cancel remains the escape hatch; a follow-up will surface deferral to the client as a visible session/update note instead of a cap. Closing this in favor of #85 — your commit is preserved there (rebased, credited in the commit chain). |
|
Thanks for carrying this forward and preserving the attribution. The adaptations make sense, especially matching code 1308 and avoiding the redundant cancelled branch. I agree with keeping lock-held deferral uncapped while user cancellation remains available. Surfacing the deferral through a visible session/update note sounds like the right follow-up. Glad to see this merged in #85. Thanks again! |
Summary
session/readonly repeatsstatus: runningsession/goal showmax_turn_requestsoutcome when the lock is released or indeterminateWhy this is a Draft
This implements the narrow, conservative case described in #80: a stale running projection can no longer keep a turn alive after the real prompt lock has been released.
An explicitly held prompt lock defers the next terminal decision by another 120 seconds. That can repeat while the backend continues to prove ownership of the turn. This avoids imposing an arbitrary hard limit on a legitimate long-running model or tool operation, but deliberately does not define policy for a genuinely stuck prompt lock. Maintainer feedback on that boundary is welcome before marking this ready.
Tests
prompt()for stale running plus released lockend_turneslinton changed TypeScript filestsc --noEmittscRefs #80